package com.zb.frame.modules.sys.mapper;

import com.zb.frame.modules.sys.entity.RelRoleMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bangZZ
 * @since 2020-06-04
 */
@Repository
public interface RelRoleMenuMapper extends BaseMapper<RelRoleMenu> {

    List<Long> getMenuIdsByRoles(@Param("roles") Set<String> roles);

    List<RelRoleMenu> getRolesByMenuId(Long id);

    int deleteByRoleIdAndMenuIds(Map map);
}
